<template>
  <div class="avue-logo">
    <transition name="fade">
      <span
        v-if="keyCollapse"
        class="avue-logo_subtitle"
        key="0">
        {{ website.logo }}
      </span>
    </transition>
    <transition-group name="fade">
      <template v-if="!keyCollapse">
        <span
          class="avue-logo_title"
          key="1">
          <svg
            xmlns="http://www.w3.org/2000/svg"
            xmlns:xlink="http://www.w3.org/1999/xlink"
            fill="none"
            version="1.1"
            width="40"
            height="26.666667938232422"
            viewBox="0 0 40 26.666667938232422"><defs><pattern
              x="0"
              y="0"
              width="40"
              height="26.666667938232422"
              patternUnits="userSpaceOnUse"
              id="master_svg0_447_88101"><image x="-9.5367431640625e-7" y="0" width="40.00000190734863" height="26.666667938232422" xlink:href=""/></pattern></defs><g style="mix-blend-mode:passthrough"><rect
                x="0"
                y="0"
                width="40"
                height="26.666667938232422"
                rx="0"
                fill="url(#master_svg0_447_88101)"
                fill-opacity="1"/></g></svg>
          {{ website.indexTitle }} </span>
      </template>
    </transition-group>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  name: 'Logo',
  data () {
    return {}
  },
  created () {
  },
  computed: {
    ...mapGetters(['website', 'keyCollapse'])
  },
  methods: {}
}
</script>

<style lang="scss">
.fade-leave-active {
  transition: opacity 0.2s;
}
.fade-enter-active {
  transition: opacity 2.5s;
}
.fade-enter,
.fade-leave-to {
  opacity: 0;
}
.avue-logo {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 64px;
  line-height: 64px;
  background-color: #ffffff;
  overflow: hidden;
  box-sizing: border-box;
  // box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
  z-index: 1024;
  display:flex;
  justify-content: center;
  &_title {
    display: flex;
    align-items: center;
    text-align: center;
    color:#303133;
    font-size: 16px;
    font-weight: bold;
  }
  &_subtitle {
    display: block;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
  }
}
</style>